import request from '@/utils/request'

// 查询WOS列表
export function listWos(query) {
  return request({
    url: '/intelligence/wos/list',
    method: 'get',
    params: query
  })
}

// 查询WOS详细
export function getWos(id) {
  return request({
    url: '/intelligence/wos/' + id,
    method: 'get'
  })
}

// 新增WOS
export function addWos(data) {
  return request({
    url: '/intelligence/wos',
    method: 'post',
    data: data
  })
}

// 修改WOS
export function updateWos(data) {
  return request({
    url: '/intelligence/wos',
    method: 'put',
    data: data
  })
}

// 删除WOS
export function delWos(id) {
  return request({
    url: '/intelligence/wos/' + id,
    method: 'delete'
  })
}

// 导出WOS
export function exportWos(query) {
  return request({
    url: '/intelligence/wos/export',
    method: 'get',
    params: query
  })
}

export function updateCount(id) {
  return request({
    url: '/intelligence/wos/updateCount',
    method: 'post',
    data: {id:id}
  })
}

export function getWosData(id) {
  return request({
    url: '/intelligence/wos/getWosData',
    method: 'post',
    data: {id:id}
  })
}

export function downloadWos(fileName){
  window.location.href = process.env.VUE_APP_BASE_API + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + false;
}


